<?php
declare (strict_types = 1);

namespace app\admin\controller\system;

use think\Request;

class PermissionController
{

    public function index()
    {
        return json([
            'code' => 200,
            'msg' => 'success',
            'data' => [
                [
                    'id' => 1,
                    'name' => '控制台',
                    'type' => 2,
                    'icon' => 'layui-icon-home',
                    'url' => 'admin/index/index'
                ],[
                    'id' => 2,
                    'name' => '系统管理',
                    'type' => 1,
                    'icon' => 'layui-icon-home',
                    'url' => 'admin/index/user',
                    'children' => [
                        [
                            'id' => 21,
                            'name' => '用户管理',
                            'type' => 1,
                            'icon' => 'layui-icon-home',
                            'children' => [
                        [
                            'id' => 212,
                            'name' => '用户管理2',
                            'type' => 2,
                            'icon' => 'layui-icon-home',
                        ]
                    ]
                        ]
                    ]
                ]
            ]
        ]);
    }
}
